package j.android.activity;

import j.android.R;
import j.android.util.PackageUtil;
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.view.View;

public class PackageManagerActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.common);
		
	}

	public void button1Click(View view) {
		String filePath = Environment.getExternalStorageDirectory()
				.getAbsolutePath() + "/JAndroid.apk";
		Log.e("tag", filePath);
		PackageUtil.installApk(PackageManagerActivity.this, filePath);
	}

	
	public void button2Click(View view) {
		String packageName = "com.dreajay.jnote";
		Log.e("tag", packageName);
		PackageUtil.uninstallApk(this, packageName);
	}
	
}
